#include<iostream>
using namespace std;
int main()
{
	int n, a=1, b=1, t;
	int sum = 0;
	cin >> n;
	if (n ==1&&n==2)
		cout << 1;
	for (int i = 3; i <= n; i++)
	{
		t = a + b;
		b = a;
		a = t;
	}
	cout << a;
	return 0;
}